package com.xps.and.yuntong.Data.bean1;

import com.google.gson.Gson;

import org.json.JSONException;
import org.json.JSONObject;

import java.util.List;

/**
 * Created by Administrator on 2018/2/1.
 */

public class OrderDetail {

    @Override
    public String toString() {
        return "OrderDetail{" +
                "return_code='" + return_code + '\'' +
                ", return_msg='" + return_msg + '\'' +
                ", return_body=" + return_body +
                '}';
    }

    /**
     * return_code : SUCCESS
     * return_msg : 查询成功
     * return_body : {"orderData":{"order_id":"1677","order_sn":"H124897683222034","order_state":"5","order_type":"1","pay_status":"0","departure_time":"0","start_time":"1517210324","end_time":"1517294617","begin_address":"天津市西青区环岛西路","begin_lng":"117.235383","begin_lat":"39.039974106432","end_address":"实验中学","end_lng":"117.198041","end_lat":"39.104204","real_km":"0.000","congestion_time":"0","congestion_money":"0.00","wait_time":"0","wait_money":"0.00","total_money":"29.20","real_total_money":"0.00","is_appraises":"0","is_closed":"0","batch_id":"2018012418-MoZSoJ"},"studentData":[{"order_id":"254","order_state":"6","start_time":"1517293865","end_time":"1517294611","begin_address":"天津市河西区江水道","begin_lng":"117.231889","begin_lat":"39.05753210667","end_address":"实验中学","end_lng":"117.198041","end_lat":"39.104204","is_closed":"0","head_img":"http://yuntontech.oss-cn-beijing.aliyuncs.com/default/headImg/boy.png","mobile_phone":"17116380559","name":"8e8edb4c"},{"order_id":"338","order_state":"6","start_time":"1517294605","end_time":"1517294617","begin_address":"天津市河西区九连山路","begin_lng":"117.227424","begin_lat":"39.066283106776","end_address":"实验中学","end_lng":"117.198041","end_lat":"39.104204","is_closed":"0","head_img":"http://yuntontech.oss-cn-beijing.aliyuncs.com/default/headImg/boy.png","mobile_phone":"17118809314","name":"e0ac4b8b"},{"order_id":"343","order_state":"6","start_time":"1517194326","end_time":"1517194419","begin_address":"天津市西青区环岛西路","begin_lng":"117.232599","begin_lat":"39.0521071066","end_address":"实验中学","end_lng":"117.198041","end_lat":"39.104204","is_closed":"0","head_img":"http://yuntontech.oss-cn-beijing.aliyuncs.com/default/headImg/boy.png","mobile_phone":"17181826946","name":"c93da281"},{"order_id":"346","order_state":"6","start_time":"1517210324","end_time":"1517290751","begin_address":"天津市西青区环岛西路","begin_lng":"117.235383","begin_lat":"39.039974106432","end_address":"实验中学","end_lng":"117.198041","end_lat":"39.104204","is_closed":"0","head_img":"http://yuntontech.oss-cn-beijing.aliyuncs.com/default/headImg/boy.png","mobile_phone":"17146119489","name":"21538d9f"}],"driverData":{"name":"郑英","mobile_phone":"17146779776","head_img":"http://yuntontech.oss-cn-beijing.aliyuncs.com/default/headImg/man.png","car_color":"","car_type":"","car_photo":"","car_id":"津R14231"}}
     */

    private String return_code;
    private String return_msg;
    private ReturnBodyBean return_body;

    public static OrderDetail objectFromData(String str) {

        return new Gson().fromJson(str, OrderDetail.class);
    }

    public static OrderDetail objectFromData(String str, String key) {

        try {
            JSONObject jsonObject = new JSONObject(str);

            return new Gson().fromJson(jsonObject.getString(str), OrderDetail.class);
        } catch (JSONException e) {
            e.printStackTrace();
        }

        return null;
    }

    public String getReturn_code() {
        return return_code;
    }

    public void setReturn_code(String return_code) {
        this.return_code = return_code;
    }

    public String getReturn_msg() {
        return return_msg;
    }

    public void setReturn_msg(String return_msg) {
        this.return_msg = return_msg;
    }

    public ReturnBodyBean getReturn_body() {
        return return_body;
    }

    public void setReturn_body(ReturnBodyBean return_body) {
        this.return_body = return_body;
    }

    public static class ReturnBodyBean {

        @Override
        public String toString() {
            return "ReturnBodyBean{" +
                    "orderData=" + orderData +
                    ", driverData=" + driverData +
                    ", studentData=" + studentData +
                    '}';
        }

        /**
         * orderData : {"order_id":"1677","order_sn":"H124897683222034","order_state":"5","order_type":"1","pay_status":"0","departure_time":"0","start_time":"1517210324","end_time":"1517294617","begin_address":"天津市西青区环岛西路","begin_lng":"117.235383","begin_lat":"39.039974106432","end_address":"实验中学","end_lng":"117.198041","end_lat":"39.104204","real_km":"0.000","congestion_time":"0","congestion_money":"0.00","wait_time":"0","wait_money":"0.00","total_money":"29.20","real_total_money":"0.00","is_appraises":"0","is_closed":"0","batch_id":"2018012418-MoZSoJ"}
         * studentData : [{"order_id":"254","order_state":"6","start_time":"1517293865","end_time":"1517294611","begin_address":"天津市河西区江水道","begin_lng":"117.231889","begin_lat":"39.05753210667","end_address":"实验中学","end_lng":"117.198041","end_lat":"39.104204","is_closed":"0","head_img":"http://yuntontech.oss-cn-beijing.aliyuncs.com/default/headImg/boy.png","mobile_phone":"17116380559","name":"8e8edb4c"},{"order_id":"338","order_state":"6","start_time":"1517294605","end_time":"1517294617","begin_address":"天津市河西区九连山路","begin_lng":"117.227424","begin_lat":"39.066283106776","end_address":"实验中学","end_lng":"117.198041","end_lat":"39.104204","is_closed":"0","head_img":"http://yuntontech.oss-cn-beijing.aliyuncs.com/default/headImg/boy.png","mobile_phone":"17118809314","name":"e0ac4b8b"},{"order_id":"343","order_state":"6","start_time":"1517194326","end_time":"1517194419","begin_address":"天津市西青区环岛西路","begin_lng":"117.232599","begin_lat":"39.0521071066","end_address":"实验中学","end_lng":"117.198041","end_lat":"39.104204","is_closed":"0","head_img":"http://yuntontech.oss-cn-beijing.aliyuncs.com/default/headImg/boy.png","mobile_phone":"17181826946","name":"c93da281"},{"order_id":"346","order_state":"6","start_time":"1517210324","end_time":"1517290751","begin_address":"天津市西青区环岛西路","begin_lng":"117.235383","begin_lat":"39.039974106432","end_address":"实验中学","end_lng":"117.198041","end_lat":"39.104204","is_closed":"0","head_img":"http://yuntontech.oss-cn-beijing.aliyuncs.com/default/headImg/boy.png","mobile_phone":"17146119489","name":"21538d9f"}]
         * driverData : {"name":"郑英","mobile_phone":"17146779776","head_img":"http://yuntontech.oss-cn-beijing.aliyuncs.com/default/headImg/man.png","car_color":"","car_type":"","car_photo":"","car_id":"津R14231"}
         */

        private OrderDataBean orderData;
        private DriverDataBean driverData;
        private List<StudentDataBean> studentData;

        public static ReturnBodyBean objectFromData(String str) {

            return new Gson().fromJson(str, ReturnBodyBean.class);
        }

        public static ReturnBodyBean objectFromData(String str, String key) {

            try {
                JSONObject jsonObject = new JSONObject(str);

                return new Gson().fromJson(jsonObject.getString(str), ReturnBodyBean.class);
            } catch (JSONException e) {
                e.printStackTrace();
            }

            return null;
        }

        public OrderDataBean getOrderData() {
            return orderData;
        }

        public void setOrderData(OrderDataBean orderData) {
            this.orderData = orderData;
        }

        public DriverDataBean getDriverData() {
            return driverData;
        }

        public void setDriverData(DriverDataBean driverData) {
            this.driverData = driverData;
        }

        public List<StudentDataBean> getStudentData() {
            return studentData;
        }

        public void setStudentData(List<StudentDataBean> studentData) {
            this.studentData = studentData;
        }

        public static class OrderDataBean {

            @Override
            public String toString() {
                return "OrderDataBean{" +
                        "order_id='" + order_id + '\'' +
                        ", order_sn='" + order_sn + '\'' +
                        ", order_state='" + order_state + '\'' +
                        ", order_type='" + order_type + '\'' +
                        ", pay_status='" + pay_status + '\'' +
                        ", departure_time='" + departure_time + '\'' +
                        ", start_time='" + start_time + '\'' +
                        ", end_time='" + end_time + '\'' +
                        ", begin_address='" + begin_address + '\'' +
                        ", begin_lng='" + begin_lng + '\'' +
                        ", begin_lat='" + begin_lat + '\'' +
                        ", end_address='" + end_address + '\'' +
                        ", end_lng='" + end_lng + '\'' +
                        ", end_lat='" + end_lat + '\'' +
                        ", real_km='" + real_km + '\'' +
                        ", congestion_time='" + congestion_time + '\'' +
                        ", congestion_money='" + congestion_money + '\'' +
                        ", wait_time='" + wait_time + '\'' +
                        ", wait_money='" + wait_money + '\'' +
                        ", total_money='" + total_money + '\'' +
                        ", real_total_money='" + real_total_money + '\'' +
                        ", is_appraises='" + is_appraises + '\'' +
                        ", is_closed='" + is_closed + '\'' +
                        ", batch_id='" + batch_id + '\'' +
                        '}';
            }

            /**
             * order_id : 1677
             * order_sn : H124897683222034
             * order_state : 5
             * order_type : 1
             * pay_status : 0
             * departure_time : 0
             * start_time : 1517210324
             * end_time : 1517294617
             * begin_address : 天津市西青区环岛西路
             * begin_lng : 117.235383
             * begin_lat : 39.039974106432
             * end_address : 实验中学
             * end_lng : 117.198041
             * end_lat : 39.104204
             * real_km : 0.000
             * congestion_time : 0
             * congestion_money : 0.00
             * wait_time : 0
             * wait_money : 0.00
             * total_money : 29.20
             * real_total_money : 0.00
             * is_appraises : 0
             * is_closed : 0
             * batch_id : 2018012418-MoZSoJ
             */

            private String order_id;
            private String order_sn;
            private String order_state;
            private String order_type;
            private String pay_status;
            private String departure_time;
            private String start_time;
            private String end_time;
            private String begin_address;
            private String begin_lng;
            private String begin_lat;
            private String end_address;
            private String end_lng;
            private String end_lat;
            private String real_km;
            private String congestion_time;
            private String congestion_money;
            private String wait_time;
            private String wait_money;
            private String total_money;
            private String real_total_money;
            private String is_appraises;
            private String is_closed;
            private String batch_id;

            public static OrderDataBean objectFromData(String str) {

                return new Gson().fromJson(str, OrderDataBean.class);
            }

            public static OrderDataBean objectFromData(String str, String key) {

                try {
                    JSONObject jsonObject = new JSONObject(str);

                    return new Gson().fromJson(jsonObject.getString(str), OrderDataBean.class);
                } catch (JSONException e) {
                    e.printStackTrace();
                }

                return null;
            }

            public String getOrder_id() {
                return order_id;
            }

            public void setOrder_id(String order_id) {
                this.order_id = order_id;
            }

            public String getOrder_sn() {
                return order_sn;
            }

            public void setOrder_sn(String order_sn) {
                this.order_sn = order_sn;
            }

            public String getOrder_state() {
                return order_state;
            }

            public void setOrder_state(String order_state) {
                this.order_state = order_state;
            }

            public String getOrder_type() {
                return order_type;
            }

            public void setOrder_type(String order_type) {
                this.order_type = order_type;
            }

            public String getPay_status() {
                return pay_status;
            }

            public void setPay_status(String pay_status) {
                this.pay_status = pay_status;
            }

            public String getDeparture_time() {
                return departure_time;
            }

            public void setDeparture_time(String departure_time) {
                this.departure_time = departure_time;
            }

            public String getStart_time() {
                return start_time;
            }

            public void setStart_time(String start_time) {
                this.start_time = start_time;
            }

            public String getEnd_time() {
                return end_time;
            }

            public void setEnd_time(String end_time) {
                this.end_time = end_time;
            }

            public String getBegin_address() {
                return begin_address;
            }

            public void setBegin_address(String begin_address) {
                this.begin_address = begin_address;
            }

            public String getBegin_lng() {
                return begin_lng;
            }

            public void setBegin_lng(String begin_lng) {
                this.begin_lng = begin_lng;
            }

            public String getBegin_lat() {
                return begin_lat;
            }

            public void setBegin_lat(String begin_lat) {
                this.begin_lat = begin_lat;
            }

            public String getEnd_address() {
                return end_address;
            }

            public void setEnd_address(String end_address) {
                this.end_address = end_address;
            }

            public String getEnd_lng() {
                return end_lng;
            }

            public void setEnd_lng(String end_lng) {
                this.end_lng = end_lng;
            }

            public String getEnd_lat() {
                return end_lat;
            }

            public void setEnd_lat(String end_lat) {
                this.end_lat = end_lat;
            }

            public String getReal_km() {
                return real_km;
            }

            public void setReal_km(String real_km) {
                this.real_km = real_km;
            }

            public String getCongestion_time() {
                return congestion_time;
            }

            public void setCongestion_time(String congestion_time) {
                this.congestion_time = congestion_time;
            }

            public String getCongestion_money() {
                return congestion_money;
            }

            public void setCongestion_money(String congestion_money) {
                this.congestion_money = congestion_money;
            }

            public String getWait_time() {
                return wait_time;
            }

            public void setWait_time(String wait_time) {
                this.wait_time = wait_time;
            }

            public String getWait_money() {
                return wait_money;
            }

            public void setWait_money(String wait_money) {
                this.wait_money = wait_money;
            }

            public String getTotal_money() {
                return total_money;
            }

            public void setTotal_money(String total_money) {
                this.total_money = total_money;
            }

            public String getReal_total_money() {
                return real_total_money;
            }

            public void setReal_total_money(String real_total_money) {
                this.real_total_money = real_total_money;
            }

            public String getIs_appraises() {
                return is_appraises;
            }

            public void setIs_appraises(String is_appraises) {
                this.is_appraises = is_appraises;
            }

            public String getIs_closed() {
                return is_closed;
            }

            public void setIs_closed(String is_closed) {
                this.is_closed = is_closed;
            }

            public String getBatch_id() {
                return batch_id;
            }

            public void setBatch_id(String batch_id) {
                this.batch_id = batch_id;
            }
        }

        public static class DriverDataBean {
            @Override
            public String toString() {
                return "DriverDataBean{" +
                        "name='" + name + '\'' +
                        ", mobile_phone='" + mobile_phone + '\'' +
                        ", head_img='" + head_img + '\'' +
                        ", car_color='" + car_color + '\'' +
                        ", car_type='" + car_type + '\'' +
                        ", car_photo='" + car_photo + '\'' +
                        ", car_id='" + car_id + '\'' +
                        '}';
            }

            /**
             * name : 郑英
             * mobile_phone : 17146779776
             * head_img : http://yuntontech.oss-cn-beijing.aliyuncs.com/default/headImg/man.png
             * car_color :
             * car_type :
             * car_photo :
             * car_id : 津R14231
             */

            private String name;
            private String mobile_phone;
            private String head_img;
            private String car_color;
            private String car_type;
            private String car_photo;
            private String car_id;

            public static DriverDataBean objectFromData(String str) {

                return new Gson().fromJson(str, DriverDataBean.class);
            }

            public static DriverDataBean objectFromData(String str, String key) {

                try {
                    JSONObject jsonObject = new JSONObject(str);

                    return new Gson().fromJson(jsonObject.getString(str), DriverDataBean.class);
                } catch (JSONException e) {
                    e.printStackTrace();
                }

                return null;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public String getMobile_phone() {
                return mobile_phone;
            }

            public void setMobile_phone(String mobile_phone) {
                this.mobile_phone = mobile_phone;
            }

            public String getHead_img() {
                return head_img;
            }

            public void setHead_img(String head_img) {
                this.head_img = head_img;
            }

            public String getCar_color() {
                return car_color;
            }

            public void setCar_color(String car_color) {
                this.car_color = car_color;
            }

            public String getCar_type() {
                return car_type;
            }

            public void setCar_type(String car_type) {
                this.car_type = car_type;
            }

            public String getCar_photo() {
                return car_photo;
            }

            public void setCar_photo(String car_photo) {
                this.car_photo = car_photo;
            }

            public String getCar_id() {
                return car_id;
            }

            public void setCar_id(String car_id) {
                this.car_id = car_id;
            }
        }

        public static class StudentDataBean {
            @Override
            public String toString() {
                return "StudentDataBean{" +
                        "order_id='" + order_id + '\'' +
                        ", order_state='" + order_state + '\'' +
                        ", start_time='" + start_time + '\'' +
                        ", end_time='" + end_time + '\'' +
                        ", begin_address='" + begin_address + '\'' +
                        ", begin_lng='" + begin_lng + '\'' +
                        ", begin_lat='" + begin_lat + '\'' +
                        ", end_address='" + end_address + '\'' +
                        ", end_lng='" + end_lng + '\'' +
                        ", end_lat='" + end_lat + '\'' +
                        ", is_closed='" + is_closed + '\'' +
                        ", head_img='" + head_img + '\'' +
                        ", mobile_phone='" + mobile_phone + '\'' +
                        ", name='" + name + '\'' +
                        '}';
            }

            /**
             * order_id : 254
             * order_state : 6
             * start_time : 1517293865
             * end_time : 1517294611
             * begin_address : 天津市河西区江水道
             * begin_lng : 117.231889
             * begin_lat : 39.05753210667
             * end_address : 实验中学
             * end_lng : 117.198041
             * end_lat : 39.104204
             * is_closed : 0
             * head_img : http://yuntontech.oss-cn-beijing.aliyuncs.com/default/headImg/boy.png
             * mobile_phone : 17116380559
             * name : 8e8edb4c
             */

            private String order_id;
            private String order_state;
            private String start_time;
            private String end_time;
            private String begin_address;
            private String begin_lng;
            private String begin_lat;
            private String end_address;
            private String end_lng;
            private String end_lat;
            private String is_closed;
            private String head_img;
            private String mobile_phone;
            private String name;

            public static StudentDataBean objectFromData(String str) {

                return new Gson().fromJson(str, StudentDataBean.class);
            }

            public static StudentDataBean objectFromData(String str, String key) {

                try {
                    JSONObject jsonObject = new JSONObject(str);

                    return new Gson().fromJson(jsonObject.getString(str), StudentDataBean.class);
                } catch (JSONException e) {
                    e.printStackTrace();
                }

                return null;
            }

            public String getOrder_id() {
                return order_id;
            }

            public void setOrder_id(String order_id) {
                this.order_id = order_id;
            }

            public String getOrder_state() {
                return order_state;
            }

            public void setOrder_state(String order_state) {
                this.order_state = order_state;
            }

            public String getStart_time() {
                return start_time;
            }

            public void setStart_time(String start_time) {
                this.start_time = start_time;
            }

            public String getEnd_time() {
                return end_time;
            }

            public void setEnd_time(String end_time) {
                this.end_time = end_time;
            }

            public String getBegin_address() {
                return begin_address;
            }

            public void setBegin_address(String begin_address) {
                this.begin_address = begin_address;
            }

            public String getBegin_lng() {
                return begin_lng;
            }

            public void setBegin_lng(String begin_lng) {
                this.begin_lng = begin_lng;
            }

            public String getBegin_lat() {
                return begin_lat;
            }

            public void setBegin_lat(String begin_lat) {
                this.begin_lat = begin_lat;
            }

            public String getEnd_address() {
                return end_address;
            }

            public void setEnd_address(String end_address) {
                this.end_address = end_address;
            }

            public String getEnd_lng() {
                return end_lng;
            }

            public void setEnd_lng(String end_lng) {
                this.end_lng = end_lng;
            }

            public String getEnd_lat() {
                return end_lat;
            }

            public void setEnd_lat(String end_lat) {
                this.end_lat = end_lat;
            }

            public String getIs_closed() {
                return is_closed;
            }

            public void setIs_closed(String is_closed) {
                this.is_closed = is_closed;
            }

            public String getHead_img() {
                return head_img;
            }

            public void setHead_img(String head_img) {
                this.head_img = head_img;
            }

            public String getMobile_phone() {
                return mobile_phone;
            }

            public void setMobile_phone(String mobile_phone) {
                this.mobile_phone = mobile_phone;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }
        }
    }
}
